@L}5 _$% l0$)$$Hȱ$ UhL" `e$$%`$%`  R@P!( L(1   Y I`  d  Ld M * @  $ % CC$$)%1 Udߥ$9%: !0 S$% DD˙`  }J)Lr d M * @  $ % CC$$)%1 Udߥ$9%: !0 S$%} DD˙`  }J)Lr J  ((  p L ()   J}L= ( L 0q A    IB JC;? D W } LL  ` W )LA!  ߰")-݆ p" } $G@LL 08`Q")<2Q0 -G$Ș݆ UL# ; p8(()(0ʥ)NQ` }$GȘ݆LU )L ݆ L GȘ ݆LL )W>Z   HH)H }p h  hyhy D L> L JJ    ! LA*` BF }7'8  M HN H` 8 Z  \LdJJ!"! GFE@F (!L }EE !E^ ^ E E7EȩEdE/EȩE  D } .L }  ;F d  ;?F7F? ( .   Z D LL d } . D  L    p  E` , d)  D L) 0BM݊L݉} ML  N݆ L NLML [ TEqEHȱEqEh 0Gȹ G} HLL GɛL  LFREE SECTORS G) *Gȩ GȽG GȌ*jj >G} C8jJ3j2CD( C202C ԠBX` N 1? l LlD:RAMDISK}.COMLu L1 L ;LHL  T`  `1  ɐ     `TU  } L ? .  t`GBJ ~DEHI B V0dV!}QDEHI VF9 ,0 ,0 s0hhL  L` H hDHEh"}DEL8HI4 0 HI,0 0  9 .G VLO#},0 L4*IJ`llD1:AUTORUN.SYSNEED MEM.SAV TO LOAD THIS FILE.D1:MEM.SAV J y08 B|DEHI$} V0 0`B;DEL`?<0LV`@ʆ v s? F0Ξ05: [ BDEHI%} VY8 B V  @  /DE `E:D1:DUP.SYSERROR-SAVING USER MEMORY ON DISKTYPE Y TO &}STILL RUN DOS B;DE J  (` 9 V⪍ ઍ  -'}LLu ÝDEHILV 9 .l 9 .l  `` s$B BH(}I|DE V BLV nB,DE JLV B V BLVDEIʩ BꭝLu  } 3E:}DISK OPERATING SYSTEM II VERSION COPYRIGHT 1984 ATARI CORP.A. DISK DIRECTORY I. FORMAT DISKB. RUN CARTRIDG*}E J. DUPLICATE DISKC. COPY FILE K. BINARY SAVED. DELETE FILE(S) L. BINARY LOADE. RENAME FILE M. RUN AT ADDRES+}SF. LOCK FILE N. CREATE MEM.SAVG. UNLOCK FILE O. DUPLICATE FILEH. WRITE DOS FILES P. FORMAT SINGLEL !N',}#"&))9(&*)/h)''-&؆莟R'S  vL/ˢ L }Insert DOS 2.0s, type Y Λx -}DEfHI 1莏#q! @ y0ɛ8A0,' ȅ 1 1ild! 1L!NO SUCH ITEMSELECT.} ITEM OR FOR MENU! 0 .z:*{}.|{ 1 0 0JB 18L%|DL/}%DIRECTORY--SEARCH SPEC,LIST FILE?[# 0 0 &|D3" 1L!NOT A DISK FILEN !B 1L!E# 1 !BD0}ED:}:1BJ|DE 1DEBHI 1 h0ߢ 0.1}  0?詛 1 y0YЛ 1 ;#L" ;#L! BL1TYPE "Y" TO DELETE...DELETE FILE SPEC2}COPY--FROM, TO?OPTION NOT ALLOWED736 FREE SECTORS COPYING---D1:DIRECK.COMl# 0|D .L/%#3}##JB|DE 1BHID#E 1#0: B 1L!#͑### B 1#c$0SY4}S1}:## # # .#Ƚ# # 𩛙## 1,#PD#ELJ- <.BJD#E 5}1 1HH 0hh|DL%1}:̳# L% #D#EL% 1 0 . .0O% 1L!WILD CARDS NOT A6}LLOWED IN DESTINATION 0 <.|K}N 2 FORMAT. t* 5) 1L!`) 0NΞ 0 L1) 1 L!BAD LOAD FILELOAD FROM WHAT FILE?) 0 ?}0#B 1L!WHAT FILE TO LOCK?) 0 0$B 1L!WHAT FILE TO UNLOCK?DUP DISK-SOURCE,DEST DRIVES?TYPE "Y" IF OK TO US@}E PROGRAM AREACAUTION: A "Y" INVALIDATES MEM.SAV.FE! +L1   `*  70 2 2A} 0.* 1 y0 0)INSERT BOTH DISKS, TYPE RETURN^, 1 y038逍 N, 1L! ,B}C, t*  Lx+, 0 ^, 1 y0 , ,0,0 ,L+ ,I0 ,Vǭ0C}Ξ, 0 }, 1 y0C,ШC, 0K'!" H H 'h h Lx+!EF 5L1L!D,I,HhD}` NOT ENOUGH ROOMINSERT SOURCE DISK,TYPE RETURNINSERT DESTINATION DISK,TYPE RETURNE}`  `8 rL1`-* 1P* 1 y0Y`hhL!NAME OF FILE TO MOVE?- 0 0|DL% <.F},^ 1 70 0 .@L# .BJ 1  DEHIB V L1 ,} 1 70,L.  G}JB|,#P#DE 1 HI BDEHHII 1 B 1 ,^ 1 70,0La- B V,#PH},^ 1 70 0L#L!-* 1P* 1 y0Yj383}mm ݭI}}`8}``|* ? ɛ,`|:-)| / 1L!`DESTINATION CANT BE DOJ}S.SYS0 0H{ 24Δ 28/L!/) 2 Π 2 0 ξK}hAΞB,0 J 1 BDEHI,HÝDE 1HIHIDELSAVE-GIVE L}FILE,START,END(,INIT,RUN)O S0 1`BDEPHI V` S0H 1 L!M}0 0 1L~0`PLEASE TYPE 1 LETTER,0`hhL! 70 1L0L<1 ,;ɛ7,"ɛ:ݦ1ݥN}A"D|ݤD|ȩ:|ȩ|ɛ,,(/+.ީ1 1,ɛ`轤{NAMEO} TOO LONG B VL!` L1I H1EΝDL1|mDiE` V0`8d/8 i:222 1 LP}!ERROR- 138ɛ+,' 20*.. өr2 1``2TOO MANY DIGITSINVALID HEXAQ}DECIMAL PARAMETER800 0 8 00`,0'D800 H,ɛh`2L1NEED D1 THRU D8uR} ECIMAL PARAMETER800 0 8 00`,0'D800 H,ɛh`2L1NEED D1 THRU D8u! acsterm.rem 508123728 146 33 100600 1432 ` ACSTERM is a terminal emulator for the Atari 800, 800xl, T}1200xl, 130xe. It provides cursor motion, insert, delete, etc. The 'termcap' file tells UNIX systems how to manipulate your sU}creen. With 'more' and screen editors like 'vi', this does near the best that can be done with a 40 column screen. The tildeV} and curly brace characters are provided using a redefined character set; ^M etc. have their usual ascii meanings. ACSTERM wW}as written by Clint Parker, author of the Action system. All sources are in the Action language. As downloaded from the bX}bs he maintained, you must use the Action cartridge. Here there is also a modification that compiles with the run-time librarY}y to make an executable file that needs no cartridge. NB! R-Verter owners: The RHAND1C modem handler converts tilde and braZ}ce characters. Since they provide the source, I deleted those parts. I also cured occasional glitches it had running full til[}t at 9600 baud, and improved its handling of S/Reset. As that software is copyright, I can't upload my version. However I am \}willing to upload a 'diff' file that shows the changes I made. These are the files: TERM.DOC read this TERMCAP.ACS get th]}is into your UNIX TERM.AC0 Compile this file. TERM1.AC0 these files will TERM2.ACT be INCLUDEd TERM.AC2 My modifications TERM^}1.ACT of TERM, TERM1. BLKIO.ACT CIO caller and fast I/O. I wrote an XMODEM module but never got it integrated into ACSTERM. _}termcap.acs 507588522 146 33 100600 194 ` aa|aacs|Atari ACS:al=^B:am:bc=\036:bs:ce=^T:cl=^L:cm=^R%+ %+ :co#`}40:\ dc=^X:dl=^E:do=\035:ei=:ho=^K:ic=^F:im=:kd=\035:kh=^L:kl=\036:kr=\037:ku=\034:\ li#24:ll=^Y:nd=\037:pt:se=^W:so=^V:up=\0a}34: term.doc 507588594 146 33 100600 5089 ` Documentation for ACS Term version 1.0 Copyright 1983 by Ab}ction Computer Services (ACS) Permission to make copies of this document for non-profit purposes is granted so long as this c}notice is reproduced on all copies. ACTION! is a trademark of Action Computer Services Atari is a trademark of Atari, Id}nc. All references should be so noted. ACS Term is a full function terminal program written in ACTION! for Atari computers.e} features: 24 lines of 40 columns format originate/answer modes full/half duplex upload/download capabilitif}es ASCII/ATASCII support screen handling: insert/delete line insert/delete character cursor posig}tioning clear screen clear to end of line start/stop inverse video home to top/bottom left h} cursor key support bell, tabulation, line feeds buffering for printer XOFF/XON support (CTRL-S/CTRL-Q) Most i}of the features of ACS Term are selected by depressing the SELECT key on the Atari. This causes ACS Term to send an XOFF andj} then display a menu of available features. Features are selected by depressing the key which represents the first letter ink} the name of the feature. Most of the featute selections are toggles between two (or more) different modes that are supportel}d (such as ASCII/ ATASCII, originate/answer). The upload and download features will work to some degree in all modes, but dom} not support XOFF and XON in the ATASCII mode (this means that you can not buffer for the printer or upload/ download files bn}igger than the size of the transfer buffer). In general, ASCII should be used at all times. Up/down loading are described lao}ter in this document. An XON is trans- mitted at the end of the selection process. Buffering for the printer is selected byp} depressing the OPTION key. If ACS Term is currently buffering, then the contents of the buffer are dumped to the printer anq}d buffering is turned off. If buffering is off, then it is turned on when the OPTION key is depressed. The print buffer is r}about 1K in size and whenever it fills up, it is dumped to the printer. An XOFF is sent before doing this and an XON is sents} when done. Control codes are not stored in the print buffer and as such are not sent to the printer. A backspace causes tht}e last character placed in the buffer to be removed. The START key is used for starting up/down loads and for ending down lou}ads. The Quit command in the SELECTion menu will exit ACS Term (after closing any open buffers) and return control to the ACv}TION! monitor. The BREAK key is not supported by ACS Term. DELETE can be used to send an ASCII DEL. The following table isw} a list of CTRL keys used to send ASCII codes not represented on the Atari keyboard: BEL (bell) CTRL-G LF (x}line feed) CTRL-J DC1 (XON) CTRL-Q DC3 (XOFF) CTRL-S ; the following codes are sent by the ; cury}sor keys FS (cursor up) GS (cursor down) RS (cursor left) US z} (cursor right) grave accent CTRL-2 opening brace CTRL-[/CTRL-, closing brace CTR{}L-]/CTRL-. tilde CTRL-; When uploading a file, you will be asked for a delay (slow?) that is used to slow d|}own transmittion for host which cannot support transfers at full baud rate. Simply hit RETURN to use the default value displ}}ayed or enter a value of your choice. A value of zero means no delay. After this you will be prompted for the upload file n~}ame. If no device is given, D: is assumed. The routine will convert your input to uppercase, so you can enter the name as l}ower- case if you want. If the file cannot be opened, you will be prompted for the name again. If any other error occurs, t}he upload will be aborted. Hit the START key to then start the upload. Hitting the START key again while the upload is in pr}ogress will abort it. When downloading a file, you will be prompted for a file name as described for uploading above. Once }the file name is given, you can begin the downloading by hitting the START key. When the down load is complete, hit the START} key again flush the rest of the characters remaining in the buffer. The following table describes the CTRL characters used }by the screen commands. A termcap entry is available for UNIX users. CTRL-B insert line CTRL-E delete line CT}RL-F insert character CTRL-G bell CTRL-H backspace CTRL-I tab CTRL-J line feed CTRL-K cursor to top} left (home) CTRL-L clear screen CTRL-M carriage return CTRL-Q XON CTRL-R cursor position, next two } bytes are column+32 and row+32 addresses. CTRL-S XOFF CTRL-T clear to end of line CTRL-V st}art inverse video CTRL-W stop inverse video CTRL-X delete character CTRL-Y cursor to bottom left ; the followi}ng codes are also sent ; by the corresponding cursor keys CTRL-\ cursor up CTRL-] cursor down CTRL-^ cursor le}ft CTRL-_ cursor right term.ac2 497500404 146 33 100600 8543 ` ; Modfied for running without cartri}dge, by A.B.Langdon ; 9/15/85 ; Before compile, SET $495=16 ; Other changes to make it run better for me. SET $491=$3000 SE}T 14=$491^ BYTE rts=[$60] ;MODULE ; TERM.ACT ; (c) 1983 ACS ; Copyright (c) 1983 ; by Action Computer Services (ACS) ; ; No} portion of this software may be ; incorporated within or included with ; another computer program that is to ; be sold to ot}her parties in any ; manner without the express written ; permission of Action Computer ; Services. Under no circumstances i}s ; this copyright notice or others ; contained within this software to be ; removed. ; version 1.0 ; last modified October }27, 1983 CARD ARRAY end(1) ; just to get ending address ; Additions & deletions for run-time version: ;DEFINE STRING = "CHA}R ARRAY" ;DEFINE EOL="$9B" INCLUDE "D2:SYS.ACT" ;MODULE ; avoids error 165 !? INCLUDE "D2:BLKIO.ACT" DEFINE file="3", print}er="4", modem="5", key="7" DEFINE ASCII="$0" DEFINE MARGIN="0" DEFINE PMAX="1100" DEFINE SLOP="30" DEFINE PTIMEOUT="5}00" DEFINE FTIMEOUT="500" CHAR keyboard, OLDCHR=$5D BYTE LMARGN=$52, COL=$55, ROW=$54 BYTE escflag, RMARGN=$53, CHBAS=$2F4 B}YTE pos, io_err, hold, inverse, lf BYTE pflag, fflag, fmode, run, ans BYTE baud, translation, pincr, fincr CARD pindex, finde}x, pcounter, slow CARD fcounter, fsize, old_Error, fmax CARD OLDADR=$5E, MEMTOP=$2E5 BYTE ARRAY modes(256) STRING Rdev(0)="R:}", Pdev(0)="P:" STRING fname(40) CHAR ARRAY pbuf(PMAX), fbuf CHAR ARRAY line, font BYTE font_hi=font+1 PROC MyError(BYTE err}, chan) PrintF("%EERROR - %I, channel %I%E", err, chan RSH 4) io_err = err RETURN BYTE FUNC MStatus=*() BYTE num_chars}=$2EB ; DVSTAT+1 XIO(modem,0,$D,0,0,Rdev) RETURN(num_chars) PROC Delay(BYTE count) BYTE RTC=20 count = count + RTC + 1} WHILE (count-RTC)>0 DO OD RETURN PROC OpenModem(BYTE trans) CARD POINTER aux Close(modem) Open(modem, Rdev, 13, 0)} XIO(modem,0,36,baud,0,Rdev) XIO(modem,0,38,trans,0,Rdev) ; set concurrent IO and no user buf. aux = $34A + (modem LSH }4) aux^ = 0 ; make sure aux = 0 XIO(modem,0,40,0,0,Rdev) RETURN PROC XOn() IF translation=ASCII THEN PutD(modem, }$11) ; XON FI RETURN PROC XOff() IF translation=ASCII THEN PutD(modem, $13) ; XOFF FI RETURN ; routines to get }char from modem INCLUDE "TERM1.ACT" ; buffering and IO routines INCLUDE "TERM2.ACT" PROC Init() BYTE POKMSK=$10, SHFLOK}=$2BE CARD i BYTE ARRAY sfont BYTE ARRAY ga(0)=[$30$18$C$4$0$0$0$0] BYTE ARRAY tilde(0)=[$0$0$0$72$9C$0$0$0] BYTE A}RRAY ob(0)=[$C$18$18$30$18$18$C$0] BYTE ARRAY cb(0)=[$30$18$18$C$18$18$30$0] ; this should really be done with ; interrupt}s off, Oh well!!! POKMSK = POKMSK & $7F ; no break key LMARGN = MARGIN SHFLOK = 0 device = 0 pos = 0 pflag = 0 } pcounter = 0 pincr = 0 fflag = 0 fmode = 0 fcounter = 0 fincr = 0 inverse = 0 escflag = 0 ans = 0 ; origin}ate hold = 0 ; XOff received flag translation = ASCII lf = 1 run = 1 baud = 10 ; for 1200 baud slow = 4000 Gra}phics(0) font = (MEMTOP - $3FF) & $FC00 MEMTOP = font - 1 fmax = MEMTOP - fbuf ; get ASCII font sfont = $E000 FOR} i = 0 TO $3FF DO ; get around MoveBlock bug font(i) = sfont(i) OD MoveBlock(font+768, ga, 8) ; grave accent MoveBl}ock(font+1008, tilde, 8) MoveBlock(font+984, ob, 8) ; opening brace MoveBlock(font+1000, cb, 8) ; closing brace CHBAS =} font_hi Zero(modes, 256) modes($1B) = 2 ; escape modes($1C) = 1 ; cursor up modes($1D) = 1 ; cursor down modes($}1E) = 1 ; cursor left modes($1F) = 1 ; cursor right modes($7D) = 1 ; clear screen modes($7E) = 1 ; back space modes($}7F) = 3 ; tab modes($9B) = 1 ; EOL modes($9C) = 1 ; delete line modes($9D) = 1 ; insert line modes($9E) = 1 ; clear t}ab modes($9F) = 1 ; set tab modes($FD) = 1 ; bell modes($FE) = 1 ; delete char modes($FF) = 4 ; insert char modes($}7) = 5 ; ^G, bell modes($8) = 6 ; ^H, backspace modes($C) = 7 ; ^L, clear screen PrintF("%EACS Term version 1.0%}E") PrintF("%ECopyright 1983%E") PrintE("Action Computer Services") PrintF("%Ebuffer size = %U%E", fmax) Close(key) :} Open(key,"K:",4,0) ; needed with no cart RETURN PROC Functions() CHAR ch BYTE ARRAY baudvlist(0)=[8 10 12 14] BYTE C}ONSOL=$D01F IF (CONSOL&$4)=0 THEN ; printer toggle XOff() IF pflag THEN ; turn off ClosePrinter() E}LSE ; turn on MyOpen(printer, Pdev, 8) IF CIO_status<128 THEN PrintF("%Ebuffering for printer%E") } pindex = 0 pflag = 1 ELSE PrintF("%EERROR - %I%E", CIO_status) FI FI WHILE (CONSOL&$4)=}0 DO OD XOn() FI IF (CONSOL&$2)=0 THEN ; SELECT XOff() PrintF("%Ecommands:%E") PrintE(" ASCII/ATASCII }toggle") PrintE(" Baud rate set") PrintE(" Down load") PrintE(" Margin toggle") PrintE(" Originate/answer} toggle") PrintE(" Quit") PrintE(" Up load") ch = GetD(key) % $20 IF ch='a THEN ; ASCII/ATASCII IF t}ranslation=ASCII THEN PrintE("ATASCII MODE") translation = 32 CHBAS = $E0 lf = 0 ELSE } PrintE("ASCII MODE") translation = ASCII CHBAS = font_hi lf = 1 FI ; CloseModem() } OpenModem(translation) ELSEIF ch='b THEN ; set baud rate PrintF("1:300%E2:1200%E3:2400%E4:9600%EChoose 1-4:") } ch = (GetD(key)-'1)&3 baud = baudvlist(ch) CloseModem() OpenModem(translation) ELSEIF ch='d THEN ;} down load fmode = 8 OpenFile("down load file name - ") IF fmode THEN PrintE("press START to begin }down load") PrintE("press START again when done.") FI ELSEIF ch='m THEN ; toggle margin IF LMARGN THE}N LMARGN = 0 ELSE LMARGN = 2 FI ELSEIF ch='o THEN ; ans/org IF ans THEN PrintE}("ORIGINATE MODE") ans = 0 ELSE PrintE("ANSWER MODE") ans = $FF FI ELSEIF ch='q THEN }; quit run = 0 ELSEIF ch='u THEN ; up load fmode = 4 OpenFile("up load file name - ") IF fmode TH}EN ; set transmit delay Print("slow? ") ch = COL PrintC(slow) COL = ch+1 Put($1E) } slow = InputC() ReadFile() PrintE("press START to begin up load") FI ELSE hold = 0 } PrintE("illegal selection") FI WHILE (CONSOL&$2)=0 DO OD XOn() FI IF (CONSOL&$1)=0 THEN ; START XOff()} IF fflag THEN ; turn off IF fmode=8 THEN ; down load CloseFile() ELSE PrintF("%Eup load abo}rted%E") FI fflag = 0 fmode = 0 ELSE hold = 0 findex = 0 IF fmode=8 THEN ; down load } PrintF("%Edown loading%E") fflag = fmode ELSEIF fmode=4 THEN ; up load PrintF("%Eup loading%E")} fflag = fmode ELSE PrintF("%Euse SELECT to select mode%E") FI FI WHILE (CONSOL&$1)=0 DO} OD XOn() FI RETURN PROC GetKey() CHAR ch, CHFLAG=$2FC, INVFLG=$2B6, BRKKEY=$11 IF fflag=4 AND hold=0 THEN c}h = FileChar() ELSE IF CHFLAG=$FF THEN RETURN FI INVFLG = 0 ; kill inverse video ch = GetD(key) FI IF ans }THEN MyPut(ch) FI IF translation=ASCII THEN IF ch=$7D THEN ; clear screen Put($7D) ; don't send just clear } RETURN ELSEIF ch=$7E THEN ; backspace ch = $8 ELSEIF ch=$7F THEN ; tab ch = $9 ELSEIF ch=$0 THEN ; l}eft brace ch = $7B ELSEIF ch=$60 THEN ; right brace ch = $7D ELSEIF ch=$7B THEN ; tilde ch = $7E } ELSEIF ch=$FD THEN ch = $60 ; grave accent ELSEIF ch=$FE OR ch=$9C THEN ch = $7F ; DEL FI FI PutD(}modem, ch) ; send char RETURN PROC Main() CHAR ch, POKMSK=$10, SHFLOK=$2BE, bank=$D500 bank = 0 fbuf = end Init() } old_Error = Error Error = MyError io_err = 0 OpenModem(translation) PrintF("%Eready%E%E") WHILE run DO MG}et() ; get chars from modem Functions() GetKey() ; send chars from keyboard ; or file pcounter =}=+ pincr IF pcounter>PTIMEOUT THEN FlushPrinter() FI fcounter ==+ fincr IF fcounter>FTIMEOUT THEN } FlushFile() FI OD XOff() IF pflag THEN ClosePrinter() FI IF fflag=8 THEN CloseFile() FI Close(modem) Close}(file) Error = old_Error CHBAS = $E0 ; reset font SHFLOK = $40 ; upper case POKMSK ==% $80 ; restore break interrupt }RETURN term.ac0 497500089 146 33 100600 7628 ` PROC rts=*()[$60] MODULE ; TERM.ACT ; (c) 1983 ACS ; C}opyright (c) 1983 ; by Action Computer Services (ACS) ; ; No portion of this software may be ; incorporated within or include}d with ; another computer program that is to ; be sold to other parties in any ; manner without the express written ; permiss}ion of Action Computer ; Services. Under no circumstances is ; this copyright notice or others ; contained within this softw}are to be ; removed. ; version 1.0 ; last modified October 27, 1983 CARD ARRAY end(1) ; just to get ending address INCLUDE} "BLKIO.ACT" DEFINE STRING = "CHAR ARRAY" DEFINE file="3", printer="4", modem="5", key="7" DEFINE EOL="$9B" DEFINE A}SCII="$0" DEFINE MARGIN="0" DEFINE PMAX="1100" DEFINE SLOP="30" DEFINE PTIMEOUT="500" DEFINE FTIMEOUT="500" CHAR keyboard, }OLDCHR=$5D BYTE LMARGN=$52, COL=$55, ROW=$54 BYTE escflag, RMARGN=$53, CHBAS=$2F4 BYTE pos, io_err, hold, inverse, lf BYTE pf}lag, fflag, fmode, run, ans BYTE baud, translation, pincr, fincr CARD pindex, findex, pcounter, slow CARD fcounter, fsize, ol}d_Error, fmax CARD OLDADR=$5E, MEMTOP=$2E5 BYTE ARRAY modes(256) STRING Rdev(0)="R:", Pdev(0)="P:" STRING fname(40) CHAR ARRA}Y pbuf(PMAX), fbuf CHAR ARRAY line, font BYTE font_hi=font+1 PROC MyError(BYTE err, chan) PrintF("%EERROR - %I, channel %I}%E", err, chan RSH 4) io_err = err RETURN PROC MStatus=*() XIO(modem,0,$D,0,0,Rdev) RETURN PROC Delay(BYTE count) BYT}E RTC=20 count = count + RTC + 1 WHILE (count-RTC)>0 DO OD RETURN PROC OpenModem(BYTE trans) CARD POINTER aux Close}(modem) Open(modem, Rdev, 13) XIO(modem,0,36,baud,0,Rdev) XIO(modem,0,38,trans,0,Rdev) ; set concurrent IO and no user }buf. aux = $34A + (modem LSH 4) aux^ = 0 ; make sure aux = 0 XIO(modem,0,40,0,0,Rdev) RETURN PROC XOn() IF translat}ion=ASCII THEN PutD(modem, $11) ; XON FI RETURN PROC XOff() IF translation=ASCII THEN PutD(modem, $13) ; XOFF } FI RETURN ; routines to get char from modem INCLUDE "TERM1.ACT" ; buffering and IO routines INCLUDE "TERM2.ACT" } PROC Init() BYTE POKMSK=$10 CARD i BYTE ARRAY sfont BYTE ARRAY ga(0)=[$30$18$C$4$0$0$0$0] BYTE ARRAY tild}e(0)=[$0$0$0$72$9C$0$0$0] BYTE ARRAY ob(0)=[$C$18$18$30$18$18$C$0] BYTE ARRAY cb(0)=[$30$18$18$C$18$18$30$0] ; this shou}ld really be done with ; interrupts off, Oh well!!! POKMSK = POKMSK & $7F ; no break key LMARGN = MARGIN pos = 0 pf}lag = 0 pcounter = 0 pincr = 0 fflag = 0 fmode = 0 fcounter = 0 fincr = 0 inverse = 0 escflag = 0 ans = 0 }; originate hold = 0 ; XOff received flag translation = ASCII lf = 1 run = 1 baud = 10 ; for 1200 baud slow = 400}0 Graphics(0) font = (MEMTOP - $3FF) & $FC00 MEMTOP = font - 1 fmax = MEMTOP - fbuf ; get ASCII font sfont = $E0}00 FOR i = 0 TO $3FF DO ; get around MoveBlock bug font(i) = sfont(i) OD MoveBlock(font+768, ga, 8) ; grave accent } MoveBlock(font+1008, tilde, 8) MoveBlock(font+984, ob, 8) ; opening brace MoveBlock(font+1000, cb, 8) ; closing brace } CHBAS = font_hi Zero(modes, 256) modes($1B) = 2 ; escape modes($1C) = 1 ; cursor up modes($1D) = 1 ; cursor down } modes($1E) = 1 ; cursor left modes($1F) = 1 ; cursor right modes($7D) = 1 ; clear screen modes($7E) = 1 ; back space } modes($7F) = 3 ; tab modes($9B) = 1 ; EOL modes($9C) = 1 ; delete line modes($9D) = 1 ; insert line modes($9E) = 1 ;} clear tab modes($9F) = 1 ; set tab modes($FD) = 1 ; bell modes($FE) = 1 ; delete char modes($FF) = 4 ; insert char } modes($7) = 5 ; ^G, bell modes($8) = 6 ; ^H, backspace modes($C) = 7 ; ^L, clear screen PrintF("%EACS Term vers}ion 1.0%E") PrintF("%ECopyright 1983%E") PrintE("Action Computer Services") PrintF("%Ebuffer size = %U%E", fmax) Clos}e(key) : Open(key,"K:") RETURN PROC Functions() CHAR ch BYTE CONSOL=$D01F IF (CONSOL&$4)=0 THEN ; printer toggle } XOff() IF pflag THEN ; turn off ClosePrinter() ELSE ; turn on MyOpen(printer, Pdev, 8) IF CIO}_status<128 THEN PrintF("%Ebuffering for printer%E") pindex = 0 pflag = 1 ELSE PrintF("}%EERROR - %I%E", CIO_status) FI FI WHILE (CONSOL&$4)=0 DO OD XOn() FI IF (CONSOL&$2)=0 THEN ; SELECT } XOff() PrintF("%Ecommands:%E") PrintE(" ASCII/ATASCII toggle") PrintE(" Down load") Prin}tE(" Originate/answer toggle") PrintE(" Quit") PrintE(" Up load") ch = GetD(key) % $20 IF ch='a THEN ; AS}CII/ATASCII IF translation=ASCII THEN PrintE("ATASCII MODE") translation = 32 CHBAS = $E0 } lf = 0 ELSE PrintE("ASCII MODE") translation = ASCII CHBAS = font_hi lf = 1 FI} CloseModem() OpenModem(translation) ELSEIF ch='d THEN ; down load fmode = 8 OpenFile("down load }file name - ") IF fmode THEN PrintE("press START to begin down load") PrintE("press START again when do}ne.") FI ELSEIF ch='o THEN ; ans/org IF ans THEN PrintE("ORIGINATE MODE") ans = 0 ELSE } PrintE("ANSWER MODE") ans = $FF FI ELSEIF ch='q THEN ; quit run = 0 ELSEIF ch='u THEN ; u}p load fmode = 4 OpenFile("up load file name - ") IF fmode THEN ; set transmit delay Print("s}low? ") ch = COL PrintC(slow) COL = ch+1 Put($1E) slow = InputC() ReadFile() } PrintE("press START to begin up load") FI ELSE hold = 0 PrintE("illegal selection") FI WHILE} (CONSOL&$2)=0 DO OD XOn() FI IF (CONSOL&$1)=0 THEN ; START XOff() IF fflag THEN ; turn off IF f}mode=8 THEN ; down load CloseFile() ELSE PrintF("%Eup load aborted%E") FI fflag = 0 f}mode = 0 ELSE hold = 0 findex = 0 IF fmode=8 THEN ; down load PrintF("%Edown loading%E") } fflag = fmode ELSEIF fmode=4 THEN ; up load PrintF("%Eup loading%E") fflag = fmode ELSE } PrintF("%Euse SELECT to select mode%E") FI FI WHILE (CONSOL&$1)=0 DO OD XOn() FI RETURN PROC GetKey() } CHAR ch, CHFLAG=$2FC, BRKKEY=$11 IF fflag=4 AND hold=0 THEN ch = FileChar() ELSE IF CHFLAG=$FF THEN RETURN FI } ch = GetD(key) FI IF ans THEN MyPut(ch) FI IF translation=ASCII THEN IF ch=$7D THEN ; clear screen Put }($7D) ; don't send just clear RETURN ELSEIF ch=$7E THEN ; backspace ch = $8 ELSEIF ch=$7F THEN ; tab } ch = $9 ELSEIF ch=$0 THEN ; left brace ch = $7B ELSEIF ch=$60 THEN ; right brace ch = $7D ELSEIF c }h=$7B THEN ; tilde ch = $7E ELSEIF ch=$FD THEN ch = $60 ; grave accent ELSEIF ch=$FE OR ch=$9C THEN } ch = $7F ; DEL FI FI PutD(modem, ch) ; send char RETURN PROC Main() CHAR ch, bank=$D500 bank = 0 fbuf = end } Init() old_Error = Error Error = MyError io_err = 0 OpenModem(translation) PrintF("%Eready%E%E") WHILE run } DO MGet() ; get chars from modem Functions() GetKey() ; send chars from keyboard ; or file }pcounter ==+ pincr IF pcounter>PTIMEOUT THEN FlushPrinter() FI fcounter ==+ fincr IF fcounter>FTIMEOUT } THEN FlushFile() FI OD XOff() IF pflag THEN ClosePrinter() FI IF fflag=8 THEN CloseFile() FI Close(mode }m) Close(file) Error = old_Error CHBAS = $E0 ; reset font RETURN term1.act 497500629 146 33 100600 5470 } ` MODULE ; TERM1.ACT ; (c) 1983 ACS ; Copyright (c) 1983 ; by Action Computer Services (ACS) ; ; No portion of this so }ftware may be ; incorporated within or included with ; another computer program that is to ; be sold to other parties in any }; manner without the express written ; permission of Action Computer ; Services. Under no circumstances is ; this copyright }notice or others ; contained within this software to be ; removed. ; ABL last modified 10/6/85. ; ACS last modified October }24, 1983 PROC LineFeed() BYTE oldcol IF ROW#23 THEN Put($1D) ELSE oldcol = COL Put(EOL) COL = oldcol } Put($1E) Put($1F) ; show cursor FI RETURN ; OOPS! Can't use sound with modem open! PROC Bell=*() BYTE CDTMV3=$21C }BYTE AUDF1=$D200, AUDC1=$D201, AUDCTL=$D208 AUDF1=48 CDTMV3=$AC DO AUDC1=CDTMV3 UNTIL CDTMV3=$A0 OD AUDC1=0 AUDF1=0 R }ETURN PROC MyPut(BYTE ch) BYTE mode, i, COLOR4=$2C8 mode = modes(ch) IF mode=0 OR escflag#0 THEN IF ch=EOL THEN } COL = LMARGN Put($1F) Put($1E) ; show cursor ELSEIF ch#$7D OR translation#ASCII THEN IF COL>=RMARGN THE }N IF ch<$20 THEN OLDCHR = ch + $40 ELSEIF ch<$60 THEN OLDCHR = ch - $20 ELSE } OLDCHR = ch FI ch = EOL FI Put($1B) ; escape Put(ch) ELSE ; closing brace O }LDCHR = $7D IF COL>=RMARGN THEN PutE() ELSE Put($1F) ; left FI FI escflag = 0 R }ETURN FI IF mode=1 THEN Put(ch) ELSEIF ch=$FF THEN ; insert char IF COL1 DO line(i) = line(i-1) i = i - 1 OD line(1) = OLDCHR line( }0) = $80 FI OLDCHR = 0 Put($1E) Put($1F) ELSEIF ch=$1B THEN ; escape escflag = 1 ELSEIF ch=$7F THEN ; ta }b COL = (COL + 8) & $F8 IF COLRMARGN THEN COL = RMARGN FI Put($1F) Put($1 }E) ELSEIF translation=ASCII THEN IF ch=$7 THEN COLOR4=36; bell Delay(6) COLOR4=0 ELSEIF ch=$8 TH }EN Put($7E) ; backspace ELSEIF ch=$C THEN Put($7D) ; clear screen FI ELSE Put(ch) FI RETURN PRO }C PutCh(CHAR ch) STRING lostmsg(0)="%Echaracters lost%E" MyPut(ch) IF pflag#0 AND ch>=$20 AND (ch<$80 OR ch=EOL) THEN } pbuf(pindex) = ch pindex = pindex + 1 IF pindex>PMAX-SLOP THEN IF pindex>=PMAX THEN pindex = PMAX !}; drop characters Close(modem) PrintF(lostmsg) pcounter = PTIMEOUT ELSEIF pcounter=0 THEN "} XOff() pcounter = 1 pincr = 1 FI FI FI IF fflag=8 THEN fbuf(findex) = ch findex = f #}index + 1 IF findex>fmax-SLOP THEN IF findex>=fmax THEN findex = fmax ; drop characters Close(modem $}) PrintF(lostmsg) fcounter = FTIMEOUT ELSEIF fcounter=0 THEN XOff() fcounter = 1 %} fincr = 1 FI FI FI RETURN PROC PutM(CHAR ch) PutD(modem, ch) IF ch=EOL AND lf#0 THEN PutD(modem, $A) &}; output LF FI RETURN PROC PutCtrl(CHAR ch, cha) MyPut(cha) IF ans THEN PutM(ch) FI RETURN PROC PutChar(CHAR ch) '}BYTE i IF pos THEN ; position X and Y bytes ch = ch - 32 IF pos=1 THEN ; row ROW = ch IF ROW>23 THEN R (}OW = 23 FI pos = 2 ELSE ; column COL = LMARGN + ch IF COL>39 THEN COL = 39 FI Put($1E) Put($1F) ; )} show cursor pos = 0 FI RETURN FI IF ch<$1B THEN IF ch=$2 THEN ; ^B, insert line Put($9D) EL *}SEIF ch=$5 THEN ; ^E, delete line Put($9C) ELSEIF ch=$6 THEN ; ^F, insert char MyPut($FF) ELSEIF ch=$7 TH +}EN ; bell PutCtrl($7, $7) ELSEIF ch=$8 THEN ; backspace PutCtrl($8, $8) IF pflag#0 AND pindex#0 AND pbu ,}f(pindex-1)#EOL THEN ; delete prev char from buffer pindex = pindex - 1 FI ELSEIF ch=$9 THEN ; tab -} PutCtrl($9, $7F) ELSEIF ch=$A THEN ; line feed LineFeed() IF ans THEN PutD(modem, $A) FI ELSEIF ch= .}$B THEN ; ^K, home top Position(LMARGN+1, 0) Put($1E) ELSEIF ch=$C THEN ; form feed PutCtrl($C, $C) ; clear s /}creen ELSEIF ch=$11 THEN ; ^Q, XON hold = 0 PrintF("%EXON") ELSEIF ch=$12 THEN ; ^R, position pos = 0} 1 ELSEIF ch=$13 THEN ; ^S, XOFF hold = 1 PrintF("%EXOFF") ELSEIF ch=$14 THEN ; ^T, clear to end of line 1} line = OLDADR line(0) = $80 FOR i = 1 TO RMARGN-COL DO line(i) = 0 ; fill in spaces OD 2}OLDCHR = 0 ELSEIF ch=$16 THEN ; ^V, inverse on inverse = $80 ELSEIF ch=$17 THEN ; ^W, inverse off inverse 3} = $0 ELSEIF ch=$18 THEN ; ^X, delete char Put($FE) ELSEIF ch=$19 THEN ; ^Y, home bottom Position(LMARGN+ 4}1, 23) Put($1E) ELSEIF ch=$1B THEN ; ESC IF escflag THEN MyPut($1B) ELSE escflag = 1 FI 5} ELSEIF ans THEN PutD(modem, '^) PutD(modem, ch+('A-1)) FI ELSEIF ch<$20 THEN ; cursor keys Put(ch) 6} ELSE escflag = 1 PutCh(ch % inverse) IF ans THEN PutM(ch) FI FI RETURN BYTE FUNC MGet() CHAR ch BYTE r 7}es res = 0 WHILE MStatus() DO res = 1 ch = GetD(modem) ; handle input character IF translation=ASCII T 8}HEN PutChar(ch) ELSE PutCh(ch) IF ans THEN PutM(ch) FI FI OD RETURN(res) term1.ac0 49750053 9}4 146 33 100600 5230 ` MODULE ; TERM1.ACT ; (c) 1983 ACS ; Copyright (c) 1983 ; by Action Computer Services ( :}ACS) ; ; No portion of this software may be ; incorporated within or included with ; another computer program that is to ; be ;} sold to other parties in any ; manner without the express written ; permission of Action Computer ; Services. Under no circ <}umstances is ; this copyright notice or others ; contained within this software to be ; removed. ; last modified October 24, =} 1983 PROC LineFeed() BYTE oldcol IF ROW#23 THEN Put($1D) ELSE oldcol = COL Put(EOL) COL = oldcol >} Put($1E) Put($1F) ; show cursor FI RETURN PROC MyPut(BYTE ch) BYTE mode, i mode = modes(ch) IF mode=0 OR escflag# ?}0 THEN IF ch=EOL THEN COL = LMARGN Put($1F) Put($1E) ; show cursor ELSEIF ch#$7D OR translation#ASCII THE @}N IF COL>=RMARGN THEN IF ch<$20 THEN OLDCHR = ch + $40 ELSEIF ch<$60 THEN OLDCHR = A}ch - $20 ELSE OLDCHR = ch FI ch = EOL FI Put($1B) ; escape Put(ch) EL B}SE ; closing brace OLDCHR = $7D IF COL>=RMARGN THEN PutE() ELSE Put($1F) ; left FI C} FI escflag = 0 RETURN FI IF mode=1 THEN Put(ch) ELSEIF ch=$FF THEN ; insert char IF COL1 DO line(i) = line(i-1) i = i - 1 OD li E}ne(1) = OLDCHR line(0) = $80 FI OLDCHR = 0 Put($1E) Put($1F) ELSEIF ch=$1B THEN ; escape escflag = 1 F} ELSEIF ch=$7F THEN ; tab COL = (COL + 8) & $F8 IF COLRMARGN THEN COL = RMA G}RGN FI Put($1F) Put($1E) ELSEIF translation=ASCII THEN IF ch=$7 THEN Put($FD) ; bell ELSEIF ch=$8 THEN H} Put($7E) ; backspace ELSEIF ch=$C THEN Put($7D) ; clear screen FI ELSE Put(ch) FI RETURN PROC Put I}Ch(CHAR ch) STRING lostmsg(0)="%Echaracters lost%E" MyPut(ch) IF pflag#0 AND ch>=$20 AND (ch<$80 OR ch=EOL) THEN J}pbuf(pindex) = ch pindex = pindex + 1 IF pindex>PMAX-SLOP THEN IF pindex>=PMAX THEN pindex = PMAX ; dro K}p characters Close(modem) PrintF(lostmsg) pcounter = PTIMEOUT ELSEIF pcounter=0 THEN XO L}ff() pcounter = 1 pincr = 1 FI FI FI IF fflag=8 THEN fbuf(findex) = ch findex = findex M} + 1 IF findex>fmax-SLOP THEN IF findex>=fmax THEN findex = fmax ; drop characters Close(modem) N} PrintF(lostmsg) fcounter = FTIMEOUT ELSEIF fcounter=0 THEN XOff() fcounter = 1 fin O}cr = 1 FI FI FI RETURN PROC PutM(CHAR ch) PutD(modem, ch) IF ch=EOL AND lf#0 THEN PutD(modem, $A) ; out P}put LF FI RETURN PROC PutCtrl(CHAR ch, cha) MyPut(cha) IF ans THEN PutM(ch) FI RETURN PROC PutChar(CHAR ch) BYTE Q}i IF pos THEN ; position X and Y bytes ch = ch - 32 IF pos=1 THEN ; row ROW = ch IF ROW>23 THEN ROW = R}23 FI pos = 2 ELSE ; column COL = LMARGN + ch IF COL>39 THEN COL = 39 FI Put($1E) Put($1F) ; show S} cursor pos = 0 FI RETURN FI IF ch<$1B THEN IF ch=$2 THEN ; ^B, insert line Put($9D) ELSEIF T}ch=$5 THEN ; ^E, delete line Put($9C) ELSEIF ch=$6 THEN ; ^F, insert char MyPut($FF) ELSEIF ch=$7 THEN ; U}bell PutCtrl($7, $7) ELSEIF ch=$8 THEN ; backspace PutCtrl($8, $8) IF pflag#0 AND pindex#0 AND pbuf(pin V}dex-1)#EOL THEN ; delete prev char from buffer pindex = pindex - 1 FI ELSEIF ch=$9 THEN ; tab W} PutCtrl($9, $7F) ELSEIF ch=$A THEN ; line feed LineFeed() IF ans THEN PutD(modem, $A) FI ELSEIF ch=$B TH X}EN ; ^K, home top Position(LMARGN+1, 0) Put($1E) ELSEIF ch=$C THEN ; form feed PutCtrl($C, $C) ; clear screen Y} ELSEIF ch=$11 THEN ; ^Q, XON hold = 0 PrintF("%EXON") ELSEIF ch=$12 THEN ; ^R, position pos = 1 Z} ELSEIF ch=$13 THEN ; ^S, XOFF hold = 1 PrintF("%EXOFF") ELSEIF ch=$14 THEN ; ^T, clear to end of line [} line = OLDADR line(0) = $80 FOR i = 1 TO RMARGN-COL DO line(i) = 0 ; fill in spaces OD OLDCH \}R = 0 ELSEIF ch=$16 THEN ; ^V, inverse on inverse = $80 ELSEIF ch=$17 THEN ; ^W, inverse off inverse = $0 ]} ELSEIF ch=$18 THEN ; ^X, delete char Put($FE) ELSEIF ch=$19 THEN ; ^Y, home bottom Position(LMARGN+1, 23 ^}) Put($1E) ELSEIF ch=$1B THEN ; ESC IF escflag THEN MyPut($1B) ELSE escflag = 1 FI _}ELSEIF ans THEN PutD(modem, '^) PutD(modem, ch+('A-1)) FI ELSEIF ch<$20 THEN ; cursor keys Put(ch) EL `}SE escflag = 1 PutCh(ch % inverse) IF ans THEN PutM(ch) FI FI RETURN BYTE FUNC MGet() CHAR ch BYTE res, n a}um_chars=747 res = 0 DO MStatus() IF num_chars=0 THEN EXIT FI res = 1 ch = GetD(modem) ; handle in b}put character IF translation=ASCII THEN PutChar(ch) ELSE PutCh(ch) IF ans THEN PutM(ch) FI FI c} OD RETURN(res) term2.act 496977686 146 33 100600 2765 ` MODULE ; TERM2.ACT ; (c) 1983 ACS ; Copyright ( d}c) 1983 ; by Action Computer Services (ACS) ; ; No portion of this software may be ; incorporated within or included with ; a e}nother computer program that is to ; be sold to other parties in any ; manner without the express written ; permission of Act f}ion Computer ; Services. Under no circumstances is ; this copyright notice or others ; contained within this software to be g}; removed. ; last modified October 24, 1983 PROC CloseModem() XOff() Delay(5) WHILE MGet() DO ; flush buffer q}B%DOS SYSB*)DUP SYSB7SACSTERM TXTBHAMODEM42BASB)AMODEM42DOCBATARIRS DOCBATARISRS232BATERM BASB.-ATERM2 BASB[AUTO850 BASB_`DLDOCTORCOMDelay(3) OD Close(modem) RETURN PROC Flush(BYTE chan, CHAR ARRAY addr, CARD size) IF size THEN WriteBlock(chan, a r}ddr, size) OpenModem(translation) XOn() FI RETURN PROC FlushPrinter() CloseModem() Flush(printer, pbuf, pinde s}x) pindex = 0 pcounter = 0 pincr = 0 RETURN PROC FlushFile() CloseModem() Flush(file, fbuf, findex) findex = 0 t} fcounter = 0 fincr = 0 RETURN PROC MyClose(BYTE chan) CloseModem() Close(chan) OpenModem(translation) RETURN PR u}OC ClosePrinter() pbuf(pindex) = EOL pindex = pindex + 1 FlushPrinter() MyClose(printer) PrintF("%Ebuffering off%E" v}) pflag = 0 RETURN PROC CloseFile() FlushFile() MyClose(file) PrintF("%Edown load stopped%E") RETURN PROC MyOpen( w}BYTE chan, STRING dev, BYTE mode, aux2) CloseModem() Close(chan) CIO(chan,dev+1,dev(0),$3,mode,aux2) EOF(chan) = 0 x}OpenModem(translation) RETURN PROC OpenFile(STRING msg) CHAR ch BYTE i DO CIO_status = 0 Print(msg) Zer y}o(fname, 3) InputMD(0, fname, 37) IF fname(0)#0 THEN IF fname(2)#': AND fname(3)#': THEN ; fill in devic z}e name fname(0)==+ 1 ; copy EOL as well SAssign(fname,fname,3,$FF) fname(1) = 'D fname(2) = ' {}: FI ; make upper case FOR i = 1 TO fname(0) DO IF fname(i)>='a AND fname(i)<='z THEN fn |}ame(i) ==& $DF FI OD MyOpen(file, fname, fmode, 0) IF CIO_status>127 THEN PrintF("%EERROR }}- %I, try again? ", CIO_status) ch = GetD(key) Put(ch) PutE() IF (ch % $20)#'y THEN fmode = ~} 0 RETURN FI FI ELSE fmode = 0 FI UNTIL CIO_status<128 OD RETURN PROC ReadFile() }CloseModem() fsize = ReadBlock(file, fbuf, fmax) OpenModem(translation) XOn() RETURN CHAR FUNC FileChar() CHAR ch } CARD i ch = fbuf(findex) findex = findex + 1 FOR i = 1 TO slow DO OD IF findex>=fsize THEN ; end of buffer IF } EOF(file) THEN ; end of file MyClose(file) PrintF("%Eup load done%E") fflag = 0 fmode = 0 ELSE ; } get another buffer worth ReadFile() findex = 0 FI FI RETURN(ch) MODULE blkio.act 507796921 146 } 33 100600 1953 ` MODULE ; BLKIO.ACT ; Copyright (c) 1983, 1984, 1985 ; by Action Computer Services (ACS) ; ; This }software may be incorporated in ; other software packages providing ; that this copyright notice is also ; incorporated as we }ll. ; version 1.1 ; last modified May 8, 1985 BYTE CIO_status CHAR FUNC CIO=*(BYTE dev, CARD addr, size, BYTE c }md, aux1, aux2) ; see hardware manual for description ; of CIOV. ; IOCB# = dev ; ICCOM = cmd ; ICBA = addr ; ICBL = } size ; ICAX1 = aux1 ; ICAX2 = aux2 ; ICAX1 and ICAX2 are not set if aux1=0 ; The first byte of addr is passed to ; CIO i }n the A register. The status ; on return from CIO is stored in ; CIO_status. If status=$88 then ; EOF(dev) is set to a non- }zero value. ; No other error checking is performed ; and the result of the CIOV call is ; returned as the result of this FUNC }. [$29$F$85$A0$86$A1$A$A$A$A$AA$A5$A5 $9D$342$A5$A3$9D$348$A5$A4$9D$349 $A5$A6$F0$8$9D$34A$A5$A7$9D$34B$98 $9D$345$A5$A1$9D$3 }44$20$E456 $8C CIO_status$C0$88$D0$6$98$A4$A0 $99 EOF$A085$60] CARD FUNC ReadBlock=*(BYTE dev, CARD add }r, size) ; Reads size bytes from dev into addr. ; Returns number of bytes read (may ; be < size if EOF). Set EOF flag if ; E }OF is encountered. Status is ; saved in CIO_status. [$48$A9$7$85$A5$A9$0$85$A6$A5$A3$5$A4 $D0$6$85$A0$85$A1$68$60$68$20 CI }O $BD$348$85$A0$BD$349$85$A1$60] PROC WriteBlock=*(BYTE dev, CARD addr, size) ; Writes size bytes from }addr to dev. ; Status is saved in CIO_status. [$48$A9$B$85$A5$A9$0$85$A6$A5$A3$5$A4 $D0$2$68$60$68$4C CIO] PROC PutCD=*(BYT }E chan, CARD n) BYTE c=$AA, lo=$AB, hi=$AC ; save args [ $85 c $86 lo $84 hi ] ; PutD(c, lo) ; PutD(c, hi }) CIO(c,lo,0,11,0) CIO(c,hi,0,11,0) RETURN CARD FUNC GetCD(BYTE chan) CARD out BYTE lo=out, hi=out+1 ; lo = GetD(c }han) ; hi = GetD(chan) lo = CIO(chan,0,0,7,0) hi = CIO(chan,0,0,7,0) RETURN(out) MODULE ; for user =out+1 ; lo = GetD(ch10 REM AMODEM4.BAS:VER 4.2; 11-24-82 20 GOTO 10000 1000 TRAP 1000:GOSUB 13000:? :? " OPTION = TOGGLE MEMORY SAVE" 1010 ? " S }ELECT = (ABORT,B,C,D,M,P,R,S,T,U)" 1020 ? " START = START TRANSMISSION" 1030 SETCOLOR 2,7,2:C$=CHR$(SRFLAG):IF SRFLAG=ZERO } THEN C$=" ":FILE$=C$ 1040 ? C$;" FILE = ";FILE$:? 1042 IF NOT TRN THEN ? "*** ASCII"; 1044 IF TRN THEN ? "*** ATARI"; 10 }46 ? " TERMINAL MODE ***" 1050 ADDR=USR(ADR(IO$),ADDR,LEN(BUFF$)+ADDR-1) 1055 C=PEEK(706):IF C=8 THEN PUT #MODEM,19:? "*** BU }FFER FULL ***":GOTO 1700 1200 IF C=6 THEN 5000 1210 IF C=5 THEN 6000 1220 IF C<>3 OR SRFLAG<>67 THEN GOTO TERM 1230 MSAVE=WON }-MSAVE:POKE 704,MSAVE:? :? "Capture "; 1240 IF MSAVE THEN SETCOLOR 2,0,2:? "On "; 1250 IF NOT MSAVE THEN SETCOLOR 2,7,2:? " }Off "; 1260 ? ADDR-BUFF;" BYTES" 1270 IF PEEK(CON)=3 THEN 1270 1280 GOTO TERM 1500 ? :? "*** NEW CAPTURE FILE ***" 1510 ? "** }* SELECT D WILL SAVE IT!***" 1520 ADDR=BUFF:GOSUB 13000 1530 SETCOLOR 2,0,2:POKE 766,1 1540 MSAVE=1:POKE 704,MSAVE:GOTO TERM }1700 ? :CLOSE #MODEM:IF ADDR<=BUFF THEN ? "*** BUFFER IS EMPTY ***":GOTO 1760 1710 TRAP 1760:? "*** SAVING MEMORY ***" 1720 O }PEN #FILE,8,ZERO,FILE$ 1730 OBJ=1:IF TRN THEN OBJ=0 1740 POKE 1536,OBJ 1750 C=USR(1610,BUFF,ADDR) 1760 MSAVE=ZERO:POKE 704,MS }AVE:ADDR=BUFF:L$="" 1790 SRFLAG=ZERO:GOTO MENU 2000 TRAN=32:GOSUB IO:A=NAK:POKE 766,1 2010 SETCOLOR 2,4,2:BLOCK=ZERO 2020 ? : }? "*** RECEIVING ";FILE$;" ***" 2300 POKE 77,ZERO:FOR TRY=WON TO ERRTRY-WON 2310 ? :? "*** GETTING SECTOR ";BLOCK+WON;"/";TRY };" ***" 2315 IF PEEK(CON)=5 THEN A=CAN 2320 PUT #MODEM,A:A=ACK 2330 GET #MODEM,SH:SUM=SH:IF SH=EOT OR SH=CAN THEN 2380 2340 G }ET #MODEM,C:SUM=SUM+C:GET #MODEM,C:SUM=SUM+C 2350 ADDR=BLOCK*128+BUFF:FOR BLK=0 TO 127:GET #MODEM,C:POKE ADDR+BLK,C:? CHR$(C) };:SUM=SUM+C:NEXT BLK 2360 GET #MODEM,C:SUM=ASC(CHR$(SUM)):IF C=SUM THEN 2380 2370 A=NAK:FOR C=WON TO 400:NEXT C:GOTO 2390 238 }0 TRY=ERRTRY 2390 NEXT TRY:BLOCK=BLOCK+1 2500 IF SH=EOT AND A=ACK THEN 2800 2510 IF SH=CAN OR A<>ACK THEN 2900 2530 GOTO 2300 } 2800 PUT #MODEM,ACK:? :? "*** SAVING FILE ***":TRAP 2860 2805 C=PEEK(ADDR+127) 2810 FOR A=ADDR+C TO ADDR+127:IF PEEK(A)<>C T }HEN C=128 2812 NEXT A:ADDR=ADDR+C:CLOSE #MODEM 2820 OBJ=ZERO:A=PEEK(BUFF):IF A>ZERO AND A<255 THEN OBJ=WON 2825 A=ZERO:IF FIL }E$(1,1)="C" AND OBJ=ZERO THEN A=128 2830 IF TRN THEN OBJ=ZERO 2840 POKE 1536,OBJ:POKE 195,WON:? "*** ";ADDR-BUFF;" BYTES" 285 }0 OPEN #FILE,8,A,FILE$:C=USR(1610,BUFF,ADDR) 2860 GOTO 2990 2900 ? :? "*** UNABLE TO RECEIVE FILE":A=NAK 2910 PUT #MODEM,CAN }2990 SRFLAG=ZERO:GOTO MENU 3000 TRAN=32:GOSUB IO:POKE 766,1 3010 SETCOLOR 2,WON,2:BLOCK=ZERO:BYTE=BYTES 3020 ? :? "*** SENDIN }G ";FILE$;" ***" 3300 POKE 77,ZERO:FOR TRY=WON TO ERRTRY 3310 ? :? "*** SENDING SECTOR ";BLOCK+WON;"/";TRY;" ***" 3320 PUT #M }ODEM,SOH:SUM=ZERO 3330 PUT #MODEM,BLOCK+WON 3340 PUT #MODEM,254-BLOCK 3350 ADDR=BLOCK*128+BUFF:FOR BLK=0 TO 127:C=PEEK(ADDR+B }LK):PUT #MODEM,C:? CHR$(C);:SUM=SUM+C:NEXT BLK 3360 SUM=ASC(CHR$(SUM)):PUT #MODEM,SUM 3370 GET #MODEM,A:IF A=CAN OR PEEK(CON) }=5 THEN 3900 3380 IF A<>ACK THEN 3400 3390 TRY=ERRTRY 3400 NEXT TRY:BLOCK=BLOCK+1 3500 IF A<>ACK THEN 3900 3510 BYTE=BYTE-128 }:IF BYTE>ZERO THEN 3300 3800 PUT #MODEM,EOT:PUT #MODEM,ZERO 3810 ? :? "*** TRANSFER COMPLETE ***" 3820 GOTO 3990 3900 ? :? "* }** UNABLE TO SEND FILE ***" 3910 PUT #MODEM,CAN 3990 GOTO MENU 4000 ? :CLOSE #MODEM 4010 FOR C=49 TO 52 4020 L$="D1:*.*":L$(2 },2)=CHR$(C) 4030 TRAP 4060:OPEN #FILE,6,ZERO,L$:? L$:TRAP 4050 4040 INPUT #FILE;L$:? L$:GOTO 4040 4050 PRINT 4060 TRAP 4065: }CLOSE #FILE 4065 IF DR=WON THEN 4080 4070 NEXT C 4080 DR=ZERO:L$="":GOTO MENU 4500 POKE 766,WON:SETCOLOR 2,2,2:? :? "*** UPLO }ADING ";FILE$;" ***" 4510 FOR I=BUFF TO BUFF+BYTES-129+BYTE 4520 PUT #MODEM,PEEK(I):IF PEEK(CON)=5 THEN ? :? "*** ABORTED *** }":GOTO 4550 4530 STATUS #MODEM,C:BLK=PEEK(747):IF BLK THEN FOR A=WON TO BLK:GET #MODEM,C:? CHR$(C);:NEXT A 4540 NEXT I 4550 F }OR I=1 TO 100:NEXT I 4560 STATUS #MODEM,C:IF PEEK(747) THEN GET #MODEM,C:? CHR$(C);:GOTO 4560 4570 ? :? "*** UPLOAD COMPLETE }***":GOTO MENU 5000 IF SRFLAG=67 THEN 1500 5010 IF SRFLAG=82 THEN 2000 5020 IF SRFLAG=83 THEN 3000 5030 IF SRFLAG=85 THEN 450 }0 5040 ? :? "*** MUST SELECT FIRST! ***" 5050 IF PEEK(CON)<>7 THEN 5040 5060 GOTO TERM 6000 ? :? " Baud, Capture, Dump, Menu }or 1-4,":? " duPlex, Receive, Send,":? " Translation, Upload ?"; 6010 CLOSE #MODEM:GET #KEY,C:C$=CHR$(C):? C$ 6012 IF C$="B" } THEN 9900 6015 IF C$="C" THEN 7000 6020 IF C$="D" THEN 1700 6025 IF C$="U" THEN 8000 6030 IF C$="M" THEN 4000 6035 IF C$="R" } THEN 7000 6040 IF C$="S" THEN 8000 6045 IF C$="T" THEN TRN=32-TRN:IF SRFLAG>82 THEN SRFLAG=ZERO 6050 IF C$="P" THEN PLX=1-PL }X:POKE 705,PLX 6055 DR=0:IF C>48 AND C<53 THEN DR=WON:GOTO 4020 6060 GOTO MENU 7000 SRFLAG=ZERO:MSAVE=ZERO:? :? "*** RECEIVE }FILESPEC "; 7010 INPUT L$:IF L$="" THEN 7090 7015 TRAP 7000:IF L$(2,2)<>":" THEN IF L$(3,3)<>":" THEN ? "SPECIFY DEVICE!":GOT }O 7000 7020 FILE$=L$:IF L$(1,1)<>"D" THEN 7080 7030 TRAP 7080:OPEN #FILE,4,ZERO,FILE$ 7040 ? :? "*** HAVE FILE ";FILE$ 7050 ? } "*** Type (Y) to ERASE ";FILE$;" "; 7060 GET #KEY,A:? CHR$(A):IF A<>89 THEN L$="":GOTO 7090 7070 CLOSE #FILE:XIO 36,#FILE,ZE }RO,ZERO,FILE$:XIO 33,#FILE,ZERO,ZERO,FILE$ 7080 SRFLAG=C:ADDR=BUFF 7090 TRAP 40000:GOTO MENU 8000 SRFLAG=ZERO:? :? "*** SEND }FILESPEC ";:INPUT L$:IF L$="" THEN 8090 8005 TRAP 8000:IF L$(2,2)<>":" THEN IF L$(3,3)<>":" THEN ? "SPECIFY DEVICE!":GOTO 800 }0 8010 A=ZERO:IF L$(1,2)="C:" THEN A=128 8014 SRFLAG=C:? "*** LOADING INTO BUFFER ***":OBJ=0 8015 ADDR=BUFF:TRAP 8080:FILE$=L }$:OPEN #FILE,4,A,FILE$ 8020 IF TRN THEN 8050 8030 GET #FILE,A:POKE ADDR,A:ADDR=ADDR+1:IF A>ZERO AND A<255 THEN OBJ=1 8050 POK }E 1536,OBJ 8060 C=USR(1537,ADDR):BYTES=C-BUFF:BYTE=((BYTES/128)-INT(BYTES/128))*128 8065 IF PEEK(195)<>136 THEN ? "*** ERROR }";PEEK(195):GOTO 8085 8070 FOR A=C TO C+127-BYTE:POKE A,BYTE:NEXT A:C=A:BYTES=C-BUFF:GOTO 8090 8080 ? CHR$(253);"*** FILE NOT } FOUND ***" 8085 SRFLAG=ZERO:L$="" 8090 TRAP 40000:GOTO MENU 9000 TRM=32-TRM 9010 GOSUB IO:GOTO MENU 9900 BAUD=BAUD+1:IF BAUD }>10 THEN BAUD=8 9910 IF BAUD<10 THEN ? 300*(BAUD-7); 9920 IF BAUD=10 THEN ? 1200; 9930 ? " BAUD":GOTO MENU 10000 C=FRE(0)-400 }:DIM BUFF$(C),IO$(170):BUFF=ADR(BUFF$):ADDR=BUFF 10005 ZERO=0:WON=1:SOH=1:EOT=4:ACK=6 10010 BEL=7:BS=8:LF=10:VT=11:CR=13 1002 }0 NAK=21:CAN=24:EOF=26:EOL=ZERO 10030 KEY=1:FILE=2:PTR=3:MODEM=4 10040 DIM C$(1),FILE$(15),L$(130) 10050 MENU=1000:TERM=1050: }PLX=0 10060 ERRTRY=10:CON=53279:IO=14000 10070 OPEN #KEY,4,ZERO,"K:" 10080 BAUD=8:GRAPHICS ZERO:? 10120 XIO 34,#MODEM,192,ZE }RO,"R1:" 10130 XIO 36,#MODEM,BAUD,ZERO,"R1:" 10180 BUFF$(1)=" ":BUFF$(C)=" " 10190 BUFF$(2,LEN(BUFF$))=BUFF$ 11000 ? " } ATARI MODEM VER. 4.2" 11010 ? " COPYRIGHT(C) 1982 JIM STEINBRECHER" 11020 ? " 37220 TRICIA DRIVE" 11030 ? " ST }ERLING HTS MI. 48077" 11040 ? :? " BUFFER= ";C;" BYTES, ";INT(C/128);" SECTORS":? 11050 ? " WITH WARD CHRISTENSEN'S XMOD }EM" 11060 ? " FILE TRANSFER PROTOCOL" 11070 ? " FOR USE ON ASCII CP/M SYSTEMS" 11080 ? :? " ATARI TO ATARI FILE T }RANSFER" 11090 ? " AND SELECTED ATARI SYSTEMS" 12000 FOR C=1536 TO 1736:READ A:POKE C,A:NEXT C 12010 FOR C=1 TO 152:READ }A:IO$(C)=CHR$(A):NEXT C 12020 POKE 704,MSAVE:POKE 705,PLX 12030 GOTO MENU 13000 TRAP 13000:TRAN=TRN 14000 CLOSE #MODEM:CLOSE }#PTR:CLOSE #FILE 14005 XIO 36,#MODEM,BAUD,ZERO,"R1:" 14010 XIO 38,#MODEM,TRAN,ZERO,"R1:" 14020 OPEN #MODEM,13,ZERO,"R1:" 1403 }0 XIO 40,#MODEM,ZERO,ZERO,"R1:" 14040 POKE 712,TRN*4.1:POKE 707,0:POKE 766,ZERO 14050 TRAP 40000:RETURN 15000 DATA 1,104,104 },133,213,104,133,212,162,32,169,7,157,66,3,169,0,157,72,3 15010 DATA 157,73,3,32,86,228,48,40,160,0,145,212,173,0,6,201,1,208 } 15020 DATA 20,177,212,201,155,208,14,169,13,145,212,230,212,208,2,230,213,169,10,145 15030 DATA 212,230,212,208,2,230,213,24 },144,196,132,195,96,74,68,83 15040 DATA 104,104,133,204,104,133,203,104,133,206,104,133,205,162,32,169,11,157,66,3 15050 DATA } 169,0,157,72,3,157,73,3,160,0,173,0,6,201,1,208,26,177,203,201 15060 DATA 13,208,20,160,1,177,203,201,10,208,12,160,0,230,20 }3,208,2,230,204,169 15070 DATA 155,145,203,160,0,177,203,32,86,228,230,203,208,2,230,204,165,203,197,205 15080 DATA 208,187,1 }65,204,197,206,208,181,96 15090 DATA 169,13,157,66,3,76,86,228,169,7,32,189,6,76,86,228 15100 DATA 168,169,11,32,189,6,152,76 },86,228,157,66,3,169,0,157,72,3,157,73,3,96 16000 DATA 104,104,133,213,104,133,212,104,133,215,104,133,214 16010 DATA 162,64, }32,163,6,173,235,2,201,0,240,68,162,64,32,171,6 16020 DATA 172,200,2,192,0,208,16,201,7,208,2,169,253,201,8,208,2,169,126 160 }30 DATA 201,32,144,20,172,192,2,240,10,162,0,129,212,230,212,208,2,230,213,162,0,32,179,6 16040 DATA 165,215,197,213,208,190, }165,214,197,212,208,184,169,8,141,194,2,96 16060 DATA 240,176,173,252,2,201,255,240,41,162,16,32,171,6,172,193,2,192 16070 DA }TA 0,240,5,162,0,32,179,6,172,200,2,192,0,208,12,201,253,208,2 16080 DATA 169,7,201,126,208,2,169,8,162,64,32,179,6,173,31,20 }8,201,7 16090 DATA 16,199,141,194,2,96 ,0,208,12,201,253,208,2 16080 DATA 169,7,201,126,208,2,169,8,162,64,32,179,6,173,31,20 ' DOCUMENTATION FOR AMODEM VER. 4.2 TERMINAL PROGRAM. This file will permit the ATARI to access an RCPM BBS that r}uns under the CP/M operating system. Also SOME ATARI BB Systems. And allow ATARI to ATARI transfer. It features uploa}ding and downloading at 300 baud and is extremely user friendly. The file may be listed here with command D. AMOD}EM4 N Then captured and saved to disk. Then ENTERed with the interface "booted" by an AUTORUN.SYS file. Wh}en RUN, it will go into terminal mode at which time the user should dial the BBS. Some systems are of the RING-BACK var}iety, so you should be prepared to let the phone ring ONCE. You will then hang up and re-dial 10-15 seconds later. Wh}en the system connects, type a few s until the BBS responds. Follow the HELP commands of the system from here.} TRANSLATION - SELECT T will toggle the translation mode between ATARI (No translation) and ASCII (Light transla}tion). Use ATARI on ATARI Systems and ASCII on RCPM Systems. MENU - For ATARI Disk systems, you may list your Menu}s with SELECT M or SELECT 1 or 2 or 3 or 4. To find files or space for new files. DUPLEX - For ATARI to ATARI file} transfer, you will need Half Duplex Since AMODEM sends no echo. You may toggle it with SELECT P. NOTE; Use ATARI Mod}e on each end. --------------------------------- NOTE: the commands XMODEM S and XMODEM R are for RCPM boards only F}or other boards, follow the directions for that system! For AMIS boards do function D or U then answer Y to XMODEM Protoco}l? --------------------------------- DOWNLOADING - To download from the BBS you must remember that it is controlled b}y a file called XMODEM. To have this file send a program to your ATARI, you must press